[IA64] RSE incomplete cfm
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 8 May 2006 19:41:18 +0000 (13:41 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 8 May 2006 19:41:18 +0000 (13:41 -0600)
commited620a7b4eaa1948855ca0f952b33fb1aaa0f4b5
treed85abe7a01a594808f24e7cae3843448fcd17e48
parent56f55a715152e72e0bf6ef503620f7de53a2c338
[IA64] RSE incomplete cfm

In theory, after Guest executes "cover", incomplete frame changes to complete
frame. So Guest should set INCOMPL to 0 just after "cover". At least before
guest psr.ic and psr.i are turned on.

Previously, only when Guest executes "rfi", INCOMPL is set to 0. The window
between "cover" and "rfi" causes trouble in below scenario.

1. Application A calls system call.

2. In OS breaks handler entry, INCOMPL is 0. Due to its system call,
   Linux kernel doesn't execute "cover".

3. Before returning to Application A, schedule happens, Application B begins
   to run.

4. A TLB miss happens on the context of B, this may make INCOMPL 1, before
   Returning to B, (that means "rfi" is not executed, and INCOMPL is still 1)
  schedule happens again. A resumes to run with INCOMPL 1 (this is incorrect now).

5. As mentioned before, this is system call, "cover" is executed in
   ia64_leave_kernel path.  Because INCOMPL is 1, this "cover" is not actually
   executed, but this "cover" should be executed.

5. Thus application A's frame is destroyed. Issue appears.

From: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h